﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using League.Entity;
using System.Data.SqlClient;
using League.DBUtility;
using System.Data;

namespace League.DataAccess
{
    public class LeagueMatchStatsHtmlDataAccess
    {
        public static bool Insert(LeagueMatchStatsHtml leagueMatchStat)
        {
            bool result = false;

            SqlParameter[] parms = {
                                       new SqlParameter("SeasonYear", leagueMatchStat.SeasonYear),
                                       new SqlParameter("LeagueName",leagueMatchStat.LeagueName),
                                       new SqlParameter("HomeTeam",leagueMatchStat.HomeTeam),
                                       new SqlParameter("VisitingTeam",leagueMatchStat.VisitingTeam),
                                       new SqlParameter("MatchStatsUrl",leagueMatchStat.MatchStatsUrl),
                                       new SqlParameter("MatchStatsHtml",leagueMatchStat.MatchStatsHtml),
                                       new SqlParameter("MatchStatsJsonUrl", leagueMatchStat.MatchStatsJsonUrl),
                                       new SqlParameter("MatchStatsJson", leagueMatchStat.MatchStatsJson)
                                   };
            LeagueSQLHelper.ExecuteNonQuery(CommandType.StoredProcedure, "LeagueMatchStatsHtmlInsert", parms);
            result = true;

            return result;
        }
    }
}
